package toman.jpa;

import toman.Prop;
import toman.orm.TO;

/**
 * Created by IntelliJ IDEA.
 * User: zslajchrt
 * Date: 30.4.11
 * Time: 20:28
 * To change this template use File | Settings | File Templates.
 */
@TO(
    id = "p.id=:photoId",
    read = "select p from Photo p",
    write = "update Photo p set p.name=:photoName, p.description=:photoDescription")
public class SimplePhotoTO {
    @Prop("id")
    private int photoId;
    @Prop("name")
    private String photoName;
    @Prop("name")
    private String description;
    @Prop("album.name")
    private String albumName;

    public String getDescription() {
        return description;
    }

    public int getPhotoId() {
        return photoId;
    }

    public void setPhotoId(int photoId) {
        this.photoId = photoId;
    }

    public String getPhotoName() {
        return photoName;
    }

    public void setPhotoName(String photoName) {
        this.photoName = photoName;
    }

    public String getAlbumName() {
        return albumName;
    }

}
